Previous Book Contents Book Index Next

Inside Macintosh: Mac OS 8 Toolbox Reference /
Chapter 3 - Window Manager Reference / Window Manager Types and Constants


FindWindow Result Code Constants

CHANGED WITH THE APPEARANCE MANAGER

When your application receives a mouse-down event, you typically call FindWindow. FindWindow returns an integer that specifies the location, in global coordinates, of the cursor at the time the user pressed the mouse button.

enum {                
   inDesk        = 0,  
   inMenuBar     = 1,  
   inSysWindow   = 2,  
   inContent     = 3,  
   inDrag        = 4,  
   inGrow        = 5,  
   inGoAway      = 6,  
   inZoomIn      = 7,  
   inZoomOut     = 8,  
   inCollapseBox = 11 
};

Constant descriptions

inDesk
The cursor is in the desktop region, not in the menu bar, a driver window, or any window that belongs to your application. When FindWindow returns inDesk, your application doesn't need to do anything.
inMenuBar
The user has pressed the mouse button while the cursor is in the menu bar. When FindWindow returns inMenuBar, your application typically adjusts its menus and then calls the Menu Manager function MenuSelect to let the user choose menu items.
inSysWindow
The user has pressed the mouse button while the cursor is in a window belonging to a driver in your application's partition. If FindWindow returns inSysWindow, your application typically calls the function SystemClick.
inContent
The user has pressed the mouse button while the cursor is in the content area (excluding the size box in an active window) of one of your application's windows. When FindWindow returns inContent, your application determines how to handle clicks in the content region.
inDrag
The user has pressed the mouse button while the cursor is in the drag region of a window. When FindWindow returns inDrag, your application typically calls DragWindow to let the user drag the window to a new location.
inGrow
The user has pressed the mouse button while the cursor is in an active window's size box. When FindWindow returns inGrow, your application typically calls GrowWindow .
inGoAway
The user has pressed the mouse button while the cursor is in an active window's close box. When FindWindow returns inGoAway, your application typically calls TrackGoAway to track mouse activity while the button is down and then calls its own function for closing a window if the user releases the button while the cursor is in the close box.
inZoomIn
The user has pressed the mouse button while the cursor is in the zoom box of an active window that is currently in the standard state. When FindWindow returns inZoomIn, your application typically calls TrackBox to track mouse activity while the button is down and then calls its own function for zooming a window if the user releases the button while the cursor is in the zoom box.
inZoomOut
The user has pressed the mouse button while the cursor is in the zoom box of an active window that is currently in the user state. When FindWindow returns inZoomOut, your application typically calls the function TrackBox to track mouse activity while the button is down. Your application then calls its own function for zooming a window if the user releases the button while the cursor is in the zoom box.
inCollapseBox
The user has pressed the mouse button while the cursor is in an active window's collapse box. When FindWindow returns inCollapseBox, your application typically does nothing, because the system will collapse your window for you.

WHEN THE APPEARANCE MANAGER IS NOT AVAILABLE
The inCollapseBox constant will not be returned by FindWindow.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
8 JAN 1998